fix: avoid undesired reloadInputViews during keyboard dismissal#1235
Merged
kirillzyusko merged 2 commits intomainfrom Dec 9, 2025
Merged
fix: avoid undesired reloadInputViews during keyboard dismissal#1235kirillzyusko merged 2 commits intomainfrom
reloadInputViews during keyboard dismissal#1235kirillzyusko merged 2 commits intomainfrom
Conversation
Contributor
📊 Package size report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Fixed issue with non-dismissible keyboard on iOS 26.
💡 Motivation and Context
The problem stems from the fact that we compare
61.66668701171875vs61.666666666666664in old implementation. As a result we were callingUIResponder.reloadInputViewtoo often and during dismissal it caused a keyboard to appear again.To fix it I added
abs(frame.height - desiredHeight) > 0.001instead offrame.height != desiredHeight. It fixed problem but introduced regression - initial frame had incorrect dimension. It turns out thatlayoutSubviewswasn't called many times and because of that we didn't specify correct layout. So after creation we need to specify frame. Since we need to do it for modern/legacy views I decided to put common code in default implementation ofsetupContainerSpecificsand callsuper.setupContainerSpecifics()fromsetupContainerSpecifics(in child classes).Also I wanted to cover this component by e2e tests, but I realized that we can not touch invisible
TouchableWithoutFeedback. Then I decided to add button + useKeyboardStickyView, but I discovered too many issues:KeyboardExtenderin keyboard rectangle (known issue);KeyboardStickyViewdoesn't change its position (iOS 26 specific bug?)So taking all these issues into account I decided not to fix all of these issues inside one PR. I'll address them later.
Closes #1207
📢 Changelog
iOS
abs(frame.height - desiredHeight) > 0.001instead offrame.height != desiredHeight;updateContentFrame(desiredHeight: calculateDesiredHeight())in default implementation ofsetupContainerSpecifics;super.setupContainerSpecifics()fromsetupContainerSpecifics(in child classes);🤔 How Has This Been Tested?
Tested in example app.
📸 Screenshots (if appropriate):
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-12-08.at.19.59.39.mov
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-12-08.at.19.53.20.mov
📝 Checklist